package com.azure.apachedubbo.rest.service;

import com.azure.apachedubbo.api.service.DemoUserService;
import org.springframework.stereotype.Service;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.Arrays;
import java.util.List;

/**
 * @Author: liuhuaibin
 * @Date: 2019/2/26 09:13
 * @Description:
 */
@Service("demoRestService")
@Path("/user")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class DemoRestService  implements DemoUserService {

    /** '@GET'、'@POST'注解必须存在*/
    @GET
    @Path("/all")
    @Override
    public List<String> findAll() {
        return Arrays.asList("hello","!","dubbo");
    }
}
